package com.echat.business.book.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.echat.business.book.dao.DiscussionMapper;
import com.echat.business.book.model.Discussion;
import com.echat.business.book.service.IDiscussionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 书籍评论表  服务实现类
 * </p>
 *
 * @author chentl123
 * @since 2019-05-28
 */
@Service
public class DiscussionServiceImpl extends ServiceImpl<DiscussionMapper, Discussion> implements IDiscussionService {

    @Autowired
    private DiscussionMapper discussionMapper;

    @Override
    public List<Discussion> getDiscussionAndReplyByBookId(Page<Discussion> page,Integer bookId) {
        return discussionMapper.getDiscussionAndReplyByBookId(page,bookId);
    }
}
